<template>
  <div>
    <h3>{{ msg }}</h3>

    <h4>不带参数传递的【声明】式路由跳转</h4>
    <router-link :to="{name:'Goods'}">商品</router-link>

    <h4>带?name=lzm&age=28类型的参数传递的【声明式】路由跳转</h4>
    <router-link :to="{name:'Search',query:{name:'lzm',age:28}}">搜索</router-link>

    <h4>restful类型的参数传递的【声明式】路由跳转</h4>
    <router-link :to="{name:'Register',params:{name:'iphone',age: 18}}">用户注册</router-link>

    <h3>演示【编程】类型路由跳转</h3>
    <router-link :to="{name:'Rank'}">排名</router-link>

  </div>
</template>

<script>
export default {
  name: 'Index',
  data() {
    return {
      msg: '演示路由跳转'
    }
  }
}
</script>


